package net.begincode.blog.service;

import net.begincode.blog.bean.param.BlogClassQueryParam;
import net.begincode.blog.bean.param.BlogQueryParam;
import net.begincode.blog.bean.vo.BlogBaseInfo;
import net.begincode.blog.bean.vo.BlogWithKeyWords;
import net.begincode.blog.bean.vo.CheckBlog;
import net.begincode.blog.entity.Blog;
import net.begincode.page.PageResponse;

import java.util.List;

public interface BlogService {
    //新增博文关键字
    int addBlogKeyWords(Long blogId,List<Long> keyWordIds);
    //删除博文关键字
    int delBlogKeyWords(Long blogId,List<Long> keyWordIds);
    //新增或修改博文分类
    int addOrUpdateHomeTypeBlog(Long blogId,Long homeTypeId);
    //修改
    int updateBlog(Blog blog);
    //查询审核博文
    PageResponse<CheckBlog> selectCheckBlog(BlogQueryParam queryParam);

    List<BlogBaseInfo> selectEffectByIds(List<Long> blogIds);

    BlogWithKeyWords queryBlogById(Long blogId, String blogFlag);

    int countClass(BlogClassQueryParam queryParam);

    List<Blog> selectClass(BlogClassQueryParam queryParam);

    List<BlogBaseInfo> queryRecommend(Long homeTypeId,int limit);

    List<Blog> selectTopN(String flag,int limit);

}
